package com.frejoys.admin.controller;

import com.frejoys.common.aop.Authority;
import com.frejoys.common.aop.Authorization;
import com.frejoys.common.constant.CommonConstant;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "库存", description = "库存")
@RestController
@RequiredArgsConstructor
@RequestMapping(CommonConstant.routePrefixAdmin)
@Authorization(Authority.Private)
public class AdminHiveRepertoryController {


    // private final HiveRepertoryService hiveRepertoryService;
    //
    //
    // @Operation(summary = "库存批量添加")
    // @PostMapping("/hiveRepertory/importAdd")
    // public Result importAdd(@RequestParam("file") MultipartFile file, @Validated HiveImportAddDto dto) {
    //     List<HiveRepertoryImportAddDto> list = new ArrayList<>();
    //     try {
    //         list = ExcelUtil.importExcel(file, HiveRepertoryImportAddDto.class);
    //     } catch (Exception e) {
    //         e.printStackTrace();
    //     }
    //
    //     if (list.isEmpty()) {
    //         throw new GeneralException(HttpStatus.importNoExist);
    //     }
    //
    //     hiveRepertoryService.saveImportData(list, dto);
    //     return Result.success();
    // }



}
